#include "widget.h"

#include <QApplication>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
//    QString style("QWidget { color: red;}");
//    //把其他两个的颜色单独设置
//    style += "#pushButton_3 { color: green;}";
//    style += "#pushButton_2 { color: blue;}";
    //有其他控件，同时设置相同的样式
    QString style = "QPushButton,QLineEdit,QLabel { color: red; }";
    a.setStyleSheet(style);
    Widget w;
    w.show();
    return a.exec();
}
